<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script type="text/javascript">
      // 连续解构赋值
      let obj = { a: { b: { c: 1 } } };
      const {
        a: {
          b: { c },
        },
      } = obj;
      console.log(c);

      //连续解构赋值并重命名
      const obj1 = { a: { b: 2 } };
      const {
        a: { b: data },
      } = obj1;
      console.log(data);
    </script>
  </body>
</html>
